<template>
  <div class="container">
    <data-view
      propViewKey="dept_demand_sum"
      propViewForm="dept/demandsum/detail.vue"
      propFlowKey="std_audit_demand"
      :propParentPage="_self"
      ref="dataView"
      @after-load="afterLoad"
      :propIsTdesign="true"
    />
  </div>
</template>

<script>

export default {
  name: 'demandsum',
  data() {
    return {
      openOnce: false
    }
  },
  components: {

  },
  methods: {
    afterLoad() {
      //有路由参数，则打开编辑窗口，只打开一次
      if (!this.openOnce && this.$route.params && this.$route.params.id) {
        this.$refs.dataView.viewRow(this.$route.params.id)
        this.openOnce = true
      }
    }
  },
  props: ['propFlowKey'],
}
</script>

<style lang="scss" scoped>
  .container {
    height: 100%;
    background-color: #fff;
  }
</style>
